const Sequelize = require('sequelize');

module.exports = conn => {

    let BreathLog = conn.define('BreathLog', {
        deviceId: {
            type: Sequelize.STRING(),
            allowNull: false
        },
        // 音量
        volumes: {
            type: Sequelize.TEXT,
            allowNull: false
        },
        startTime: {
            type: Sequelize.DATE,
            allowNull: false
        },
        endTime: {
            type: Sequelize.DATE,
            allowNull: false
        },
    }, {
        tableName: 'breathLogs'
    });

    return BreathLog;
}